﻿[#include "../include/html_header.html"/]
<script type="text/javascript">
    function checkStatus(status) {
        if (status == 1) {
            $("#status").attr("value", '');
            $("#useStatus").attr("value", '');
        } else {
            $("#status").attr("value", status);
            $("#useStatus").attr("value", '');
        }
        $("#search-form").submit();
    }

    function checkUseStatus(useStatus) {
        $("#useStatus").attr("value", useStatus);
        $("#search-form").submit();
    }
</script>

</head>
<body>
[#include "../include/html_header_top.html"/]

<div class="am-container">
    <div class="am-cf admin-main">
        <!-- sidebar start -->
        [#include "member_nav.html"/]
        <div class="admin-content">


        <div class="am-cf am-padding"><span>积分明细</span> <a href="${base}/xsrm/20.htm" target="_blank"
                                                              style="color: #1A66B3;float:right;">查看积分规则</a></div>
        <div class="am-u-sm-12">
            <ul class="am-avg-sm-1 am-avg-md-4 am-margin am-padding am-text-center admin-content-list ">
                <li class="usable-inte"><p class="available fweight">可用积分</p>

                    <p class="fweight fsize">${member.score!}</p></li>
                <li class="overdue-inte"><p>冻结积分</p>

                    <p class="fweight fsize">${member.freezeScore!}</p></li>
            </ul>

        </div>
        <div class="am-u-sm-12">
            <form id="search-form" action="myscore.htm" method="post" class="am-form">
                <div id="queryCodeNum"  class="am-u-sm-12">

                    时间:<input  type="text" name="startTime" [#if startTime??]value="${startTime!}"[/#if]
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:100px;display:inline;"/>至:
                    <input  type="text" name="endTime" [#if endTime??]value="${endTime!}"[/#if]
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:100px;display:inline;"/>

                    <input id="toQuery" type="submit" value="查询"/>

                </div>
                <input type="hidden" id="status" name="status" value="${status!}"/>
                <input type="hidden" id="useStatus" name="useStatus" value="${useStatus!}"/>

                <div class="am-u-sm-12 am-u-sm-centered">
                    <div class="am-tabs am-margin" data-am-tabs>
                        <ul class="am-tabs-nav am-nav am-nav-tabs">

                    <li [#if !(status??)&&!(useStatus??)]class="ks-active"[/#if]><a href="javascript:vodi(0);"
                                                                                onclick="checkStatus(1);">全部明细
                    [@score_page count='10'](${tag_pagination.totalCount})[/@score_page]</a></li>
                    <li [#if useStatus??&useStatus==0]class="ks-active"[/#if]><a href="javascript:vodi(0);"
                                                                             onclick="checkUseStatus(0);">全部收入[@score_page
                    useStatus='0' count='10'](${tag_pagination.totalCount})[/@score_page]</a></li>
                    <li [#if useStatus??&useStatus==1]class="ks-active"[/#if]><a href="javascript:vodi(0);"
                                                                             onclick="checkUseStatus(1);">全部支出[@score_page
                    useStatus='1' count='10'](${tag_pagination.totalCount})[/@score_page]</a></li>
                    <li [#if status??&status==0]class="ks-active"[/#if]><a href="javascript:vodi(0);"
                                                                       onclick="checkStatus(0);">冻结积分[@score_page
                    status='0' count='10'](${tag_pagination.totalCount})[/@score_page]</a></li>
                </ul>

                <div class="am-tabs-bd">
                  <div class="am-tab-panel am-fade am-in am-active" id="tab">
                        <div class="am-g am-margin-top">
                            <table class="am-table">
                            <thead>
                            <tr>
                                <th width="225" style="text-align:left; padding-left:20px;">来源 / 用途</th>
                                <th width="60">收入</th>
                                <th width="75">支出</th>
                                <th width="105">日期</th>
                                <!-- <th width="105">节省</th> -->
                                <th width="50">备注</th>
                            </tr>
                            </thead>
                            <tbody>
                            [@score_page status=status useStatus=useStatus startTime=startTime endTime=endTime
                            count='10']
                            [#if tag_list?size gt 0]
                            [#list tag_list as shopScore]
                            <tr>
                                <td style="text-align:left;vertical-align: middle; height:60px;">
                                    [#if shopScore.orderItem??]<img
                                        src="${root!}${shopScore.orderItem.product.productExt.coverImg!}" width="50"
                                        height="50"/>[/#if]
                                    [@text_cut s=shopScore.name len='20' append="..."/]
                                </td>
                                <td>[#if !(shopScore.useStatus)]${shopScore.score}([#if
                                    shopScore.status]可用[#else]冻结[/#if])[/#if]
                                </td>
                                <td>[#if shopScore.useStatus]支出[#else]收入[/#if]</td>
                                <td>${shopScore.scoreTime!}</td>
                                <!--  <td></td> -->
                                <td>${shopScore.remark!}</td>
                            </tr>
                            [/#list]
                            <tr align="center">
                                <td colspan="5">[@pagination_style sysPage='1'/]</td>
                            </tr>
                            [#else]
                            <tr align="center">
                                <td colspan="5">
                                    [#if !(status??)&&!(useStatus??)]
                                    暂无支出与收入 ，这就去<a href="${base}/" target="_self">商城</a>购买商品获得积分。
                                    [#elseif !(status??)&&useStatus==0]
                                    暂无收入，这就去<a href="${base}/" target="_self">商城</a>购买商品获得积分。
                                    [#elseif !(status??)&&useStatus==1]
                                    暂无支出，这就去<a href="${base}/" target="_self">商城</a>购买商品兑换积分。
                                    [#elseif !(useStatus??)&&status==0]
                                    暂无冻结积分 ，这就去<a href="${base}/" target="_self">商城</a>兑换商品。
                                    [/#if]
                                </td>
                            </tr>
                            [/#if]
                            [/@score_page]
                            </tbody>
                        </table>
                            </div>
                    </div>
                </div>
                        </div>
                    </div>
            </form>
        </div>
    </div>
</div>
</div>

[#include "../include/footer.html"/]

</body>
</html>